home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / xdsn217.zip / BIN / xdssamp.cmd < prev    next >
OS/2 REXX Batch file  |  1996-07-09  |  2KB  |  59 lines

  1. /***********************************************
  2.           Native XDS-x86 OS/2 Edition
  3.               v2.17 (pre-release)
  4.  
  5.        Samples Directory Creation Script
  6.  
  7.          Copyright (c) 1996 xTech Ltd.
  8. ************************************************/
  9.  
  10. '@echo off'
  11. Call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
  12. Call SysLoadFuncs
  13.  
  14. call SysCls
  15. call SysCurState off
  16. say
  17. say "    This script will prepare the directory" directory() 
  18. say "    for playing with XDS sample programs. It will create"
  19. say "    a redirection file and appropriate subdirectories."
  20. say 
  21. say "    Proceed? (Y/N)"
  22. say 
  23.  
  24. do forever
  25.   key = translate(SysGetKey('NOECHO'));
  26.   if (key = 'Y') | (key = 'N') | (key = X2C(27)) then leave
  27. end  
  28. if key <> 'Y' then exit
  29.  
  30. parse source . . xdsdir
  31. xdsdir = left(xdsdir,lastpos('\',xdsdir)-1)      /* Strip "\<cmd-name>" */
  32. xdsdir = left(xdsdir,lastpos('\',xdsdir)-1)      /* Strip "\BIN" */
  33.  
  34. say "    creating the directory structure..."
  35. 'mkdir DEF SYM OBJ SRC'
  36. if rc <> 0 then do
  37.   say "Error making subdirectories"
  38.   exit 1
  39. end
  40.  
  41. say "    creating the redirection file..."
  42. 'echo>xc.red xc.msg = 'xdsdir'\bin'
  43. 'echo>>xc.red xc.cfg = 'xdsdir'\bin'
  44. 'echo>>xc.red *.tem  = 'xdsdir'\bin'
  45. 'echo>>xc.red *.lib  = 'xdsdir'\lib'
  46. 'echo>>xc.red *.sym  = $!\sym;'xdsdir'\sym'
  47. 'echo>>xc.red *.obj  = $!\obj'
  48. 'echo>>xc.red *.rsp  = $!\obj'
  49. 'echo>>xc.red *.def  = $!\def;'xdsdir'\os2def;'xdsdir'\samples\simple'
  50. 'echo>>xc.red *.mod  = $!\src;'xdsdir'\samples\simple'
  51. 'echo>>xc.red *.ob2  = $!\src;'xdsdir'\samples\simple'
  52. 'echo>>xc.red *.prj  = $!;'xdsdir'\samples'
  53.  
  54. say ''
  55. say '    DONE'
  56. say ''
  57. exit
  58.  
  59.